home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
programs
/
mta_vf35.zip
/
MTA__TEC.EXE
/
SUBST.TEC
< prev
next >
Wrap
Text File
|
1993-02-22
|
5KB
|
111 lines
------------------------------------------------------------------------
Subject : Use of SUBST inside MTA
Target : New and advanced users
Date : 09-03-92
Rev. : 1.01 / 11-14/92 (added NOVELL example)
------------------------------------------------------------------------
In the early days the archive programs did only store path information
in a relative way. If TEMP\WHY.EXE was included in the archive, it would
unpack as .\TEMP\WHY.EXE (so as a directory UNDER the current one). At
this moment there are two popular archive programs that (can) use
ABSOLUTE directories. An entry like \TEMP\WHY.EXE would unpack as
\TEMP\WHY.EXE, so WHY.EXE would be in the directory TEMP under the ROOT
directory. Even this could be solved in a normal way but what if someone
included \DOS\COMMAND.COM (or any other file) and under your OWN root
you already have a \DOS (and a COMMAND.COM). This would result in
(dangerous) overwritten files and worse, MTA would create a new archive
with ALL files from \DOS (also those that were already there) and the
called archive-program would delete all these files also (resulting in a
non-bootable machine).
Why not allow for a virtual drive (my RAM-disk) that is really empty ?
Simple, if the source archive contains absolute directories AND some
nested archives (archives in archives) which in turn would also include
absolute directories, the new archive would not look the same as the
original archive, in fact, given a product that contains:
BLURB.CTL
\BIN\BLURB.EXE
BLURB286.ZIP ---> contains \BIN\BLURB.EXE
BLURB386.ZIP ---> contains \BIN\BLURB.EXE
It would result in:
BLURB.CTL
\BIN\BLURB.EXE (the last of the three)
And the two other BLURB.EXE files (the XT and 286 files) were gone.
To overcome all these problems, MTA will map a substituted drive over
the temporary directory (the temporary directory will become the root of
this new drive) and will extract the files as normal. With nested
archives, MTA will swap the substituted drive to the next temporary
directory under the previous and again will assign this a the new root.
In this way extraction can not overwrite your own files AND the target
archive will be the same as before.
If you do NOT include the SUBSTDrive support, MTA will not be able to
carry the directories over into the new archive. There are some related
options (SubstOn, SUbstOff) that will even make it possible to use this
mechanisme on networks that don't allow the usage of SUBST.EXE. In this
case you can use the network-version of such a program (like MAP, PAGEDR
and so on).
Unless you inform MTA, MTA will do the following sequence at startup,
to make it sure that the environment works:
- MTA will create a temporary directory
- MTA will either:
A) When you include the normal SUBST sequence (so SubstOn and SubstOff
options are NOT set:
- Call SUBST.EXE as follows 'SUBST.EXE [newdrive:] [temppath]
Where [newdrive:] is the driveletter taken from the SubstDrive
option and [temppath] is the full directory-name for the
temporary directory (drive included);
- MTA will test if the new drive is a REAL drive or a SUBST drive
(unless NoSubstTest was included in MTA.CTL). If it is NOT a
SUBST-drive, MTA will abort;
- Call SUBST.EXE as follows 'SUBST.EXE [newdrive:] /D
Where [newdrive:] is the driveletter taken from the SubstDrive
option.
B) When you include special options like SubstOn and SubstOff:
- Call SubstOn program in the format you supplied with this option
- MTA will test if the new drive is a REAL drive or a SUBST drive
(unless NoSubstTest was included in MTA.CTL). If it is NOT a
SUBST-drive, MTA will abort;
- Call SubstOff program in the format you supplied with this option
- MTA will remove the temporary directory and will advance to the normal
conversion of files.
In networks (and special environments) it can be possible that even when
you supplied the SubstOn and SubstOff parameters correctly, MTA will
fail because the new drive returns as a REAL drive. To overcome this
problem, you can include the NoSubstTest option (see MTA documentation)
to ignore the test. This must be done with great care. If the new
drive IS a real drive (containing files), the information on this drive
will be lost with the first conversion ! If the drive is a virtual drive
but reports as a real drive, everything will work fine !
Finally a working example for NOVELL <tm> where you must use the special
program MAP.EXE:
- SubstOn F:\public\MAP.EXE root %DF = %PP
- SubstOff F:\public\MAP.EXE DEL %DF
- SubstDrive M
When MAP.EXE is F:\public\ and your substitution drive should be M.